package com.ccl.service;

import com.ccl.entity.Comment;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CommentService {
    //根据id查询评论数据：分页
    public PageInfo<Comment> findCommentsByArticleId(Integer articleId, Integer commentPageNum, Integer count);

    //发表评论
    public void pushComment(Comment comment);
    //统计评论总数
    public Integer getCommentsNum();
    //查询最新评论
    public List<Comment> getRecentComments(Integer num);
    //根据id删除评论内容
    public void deleteByArticleId(Integer id);
    //评论分页查询
    public PageInfo<Comment> findWithPage(Integer pageNum,Integer count);
    //删除评论
    public void deleteById (Integer id);
}
